package com.webcamtracker.move.tracking;

import java.awt.*;
import java.awt.image.BufferedImage;

/**
 * User: Nainux
 * Date: 16-ene-2008
 * Time: 21:30:42
 */
public class TrackingEvent {
    private Object source;
    private Point point;
    private Point dimension;
    private TrackingEventType eventType;
    private final String id;
    private final float zoomFactor;
    private BufferedImage image;

    public TrackingEvent(Object source, Point point, Point dimension, TrackingEventType eventType, String id, float zoomFactor) {
        this.source = source;
        this.point = point;
        this.dimension = dimension;
        this.eventType = eventType;
        this.id = id;
        this.zoomFactor = zoomFactor;
    }

    public TrackingEvent(Object source, Point point, Point dimension, TrackingEventType eventType) {
        this(source, point, dimension, eventType, null, 1);
    }

    public TrackingEvent(Object source, Point point, Point dimension, TrackingEventType eventType, String name, float zoomFactor, BufferedImage image) {
        this(source, point, dimension, eventType, name, zoomFactor);
        this.image = image;
    }

    public float getZoomFactor() {
        return zoomFactor;
    }

    public BufferedImage getImage() {
        return image;
    }

    public Object getSource() {
        return source;
    }


    public String getId() {
        return id;
    }

    public Point getPoint() {
        return point;
    }

    public Point getDimension() {
        return dimension;
    }

    public TrackingEventType getType() {
        return eventType;
    }

    public String toString() {
        return "Point: " + this.point + ", Dimension: " + this.dimension + ", Type: " + this.eventType.name();
    }
}
